package com.walker.taogong.datamodel;

public enum TaskStatus
{
    DRAFT('D'),
    POSTED('P'),
    ASSIGNED('A'),
    COMPLETED('C'),
    CLOSED('E');
    
    private char status;
    
    private TaskStatus(char c)
    {       
        this.status = c;
    }
    public char getStatus()
    {
        return status;
    }

    public static TaskStatus valueOf(char c)
    {
        for(TaskStatus t : TaskStatus.values())
            if(t.status == c)
                return t;
        
        return DRAFT;
    }

}
